<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Channels_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-channels_id" data-rule="required" class="form-control selectpicker" name="row[channels_id]">
                {foreach $channelsList as $v}
                <option value="{$v.id}" {if condition="$v.id eq $row.channels_id"}selected="selected"{/if}>{$v.name}</option>
                {/foreach}
            </select>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Admin_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-admin_id" data-rule="required" class="form-control selectpicker" name="row[admin_id]">
                {foreach $adminList as $v}
                <option value="{$v.id}"  {if condition="$v.id eq $row.admin_id"}selected="selected"{/if}>{$v.nickname}</option>
                {/foreach}
            </select>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" data-rule="required" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content|htmlentities}</textarea>
        </div>
    </div>

    <!--是否在侧边栏展示-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否在侧边栏展示')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[is_sidebar]', ['1'=>__('Yes'), '0'=>__('No')],$row.is_sidebar)}
        </div>
    </div>

    <!--帖子内容图-->
    <div class="form-group">
        <label for="c-file_img" class="control-label col-xs-12 col-sm-2">{:__('帖子内容图')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-file_img" data-rule="" class="form-control hidden" size="50" name="row[file_img]" type="text" value="{$row.file_img|htmlentities}">
                <div class="input-group-addon no-border no-padding" style="display: table;">
                    <span>
                        <button type="button"
                                data-url="upload_file/uploadOBS"
                                id="plupload-file_img"
                                class="btn btn-danger plupload"
                                data-input-id="c-file_img"
                                data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp"
                                data-multiple="true"
                                data-preview-id="p-file_img">
                            <i class="fa fa-upload"></i> {:__('Upload')}
                        </button>
                    </span>
                    <span>
                        <button type="button"
                                id="fachoose-file_img"
                                class="btn btn-primary fachoose"
                                data-input-id="c-file_img"
                                data-mimetype="image/*"
                                data-multiple="true">
                        <i class="fa fa-list"></i> {:__('Choose')}
                        </button>
                    </span>
                </div>
                <span class="msg-box n-right" for="c-file_img"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-file_img"></ul>
        </div>
    </div>
    <!--帖子视频-->
    <div class="form-group">
        <!-- 切片上传组件 -->
        {include file="common/slicesUpload" title='帖子视频' fileInput_id='fileInput_video' name='row[file_video]' input_value='$row.file_video' url_arr='$row.file_video_url'/}
    </div>

    <!--帖子音频-->
    <div class="form-group">
        <!-- 切片上传组件 -->
        {include file="common/slicesUpload" fileInput_id='fileInput_audio' title='帖子音频' name='row[file_audio]' input_value='$row.file_audio' url_arr='$row.file_audio_url'/}
    </div>

    <!--帖子文件-->
    <div class="form-group">
        <!-- 切片上传组件 -->
        {include file="common/slicesUpload" fileInput_id='fileInput_data' title='帖子文件' name='row[file_data]' input_value='$row.file_data' url_arr='$row.file_data_url'/}
    </div>


    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
